"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Global_1 = require("../models/Global");
// This is a demo code file
// Feel free to delete it
async function default_1(call) {
    let op = await Global_1.Global.db.collection("houtai").find().toArray();
    if (!op) {
        call.error('Post 不存在');
        return;
    }
    call.succ({
        data: op.map(item => ({
            _id: item._id.toString(),
            content: item.content,
            time: item.time
        }))
    });
}
exports.default = default_1;
